<?php

namespace app\msgapi\validate;

use think\Validate;

class AuthRule extends Validate
{
    protected $rule = [
        'type|类型'   =>  'require|in:1,2',
        'title|菜单名称'   => 'require',
        'tag|按钮标识'  =>  'requireIf:type,2',
        'icon|图标' => 'alphaDash',   // 字母和数字，下划线_及破折号-
        'sort|排序' => 'number',
    ];
}